﻿<%@ Page Language="C#" MasterPageFile="~/MasterPages/MasterPage2.master" AutoEventWireup="true" CodeFile="Admin_QuanLyQuangCao.aspx.cs" Inherits="ChucNang_Admin_Admin_QuanLyQuangCao" Title="Untitled Page" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">

</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">

<center>
<h2>QUẢN LÝ QUẢNG CÁO</h2>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
        ConnectionString="<%$ ConnectionStrings:SMOConnectionString %>" 
        SelectCommand="sp_DOITAC_LayTatCa" SelectCommandType="StoredProcedure">
    </asp:SqlDataSource>
    <asp:Button ID="btnThemQC" runat="server" Text="Thêm quảng cáo" 
        onclick="btnThemQC_Click" /><br /><br />
    <asp:DataList ID="DataList_DSQuangCao" runat="server" 
        onupdatecommand="DataList_DSQuangCao_UpdateCommand" 
        ondeletecommand="DataList_DSQuangCao_DeleteCommand" 
        onitemcreated="DataList_DSQuangCao_ItemCreated" 
        onitemdatabound="DataList_DSQuangCao_ItemDataBound">
    <ItemTemplate>
        
        <table border="0" cellspacing="10" cellpadding="0" width="100%">
        	<tr>
        	    <asp:Label ID="lbIdDoiTac" runat="server" Text='<%#Eval("Id_DoiTac") %>' Visible="false"></asp:Label>
        		<td colspan="3">Vị trí:<asp:Label ID="lbViTri" runat="server" Text='<%# Eval("ViTri") %>'></asp:Label></td>
        	</tr>
        	<tr>
        		<td colspan="3">Đối tác:<asp:DropDownList ID="ddlDoiTac" runat="server" >
                    </asp:DropDownList>
                </td>
        	</tr>
        	<tr>
        		<td rowspan="2"><embed src='<%# Eval("DuongDan") %>' height="100px" width="200px"></td>
        		<td>Cao: 
                    <asp:TextBox ID="txtCao" runat="server" Text='<%# Eval("Height") %>' Width="50"></asp:TextBox> px</td>
        		<td>
                    <asp:CheckBox ID="ckHienThi" runat="server" Text="Hiển thị" Checked='<%# Eval("TrangThai") %>' /></td>
                
                    
        	</tr>
        	<tr>
        		<td>Rộng:
                    <asp:TextBox ID="txtRong" runat="server" Text='<%# Eval("Width") %>' Width="50"></asp:TextBox> px</td>
        	</tr>
        	<tr>
        		<td>
                    <asp:FileUpload ID="FileUpload1" runat="server" /></td>
                <td colspan="3" align="right">
                    <asp:Button ID="btnXoa" runat="server" Text="Xóa" CommandName="Delete" CommandArgument='<%# Eval("ViTri") %>'/>
                    <asp:Button ID="btnCapNhat" runat="server" Text="Cập nhật " CommandName="Update"  CommandArgument='<%# Eval("ViTri") %>'/>
                    </td>
        	</tr>
        </table>
        <asp:Label ID="lbDuongDan" runat="server" Text='<%# Eval("DuongDan") %>' Visible='false'></asp:Label>
    </ItemTemplate>
        <ItemStyle BorderColor="#CC0000" BorderStyle="Solid" BorderWidth="3px" />
    </asp:DataList>
    
    
</center>
</asp:Content>

